﻿var pageIndex;
var pageSize;

var CommentText;
var CreateBy;
var RoomId;
var DateTime;
var UserId;

var mainApiAddress = "http://localhost:38550/api/";
var mainFileAddress = "http://localhost:38550/AllFiles/";
//var mainApiAddress = "http://192.168.1.102:1234/api/";
//var mainFileAddress = "http://192.168.1.102:1234/AllFiles/";

var notificationType = {
    NewComment: 1,
    Accept: 2
};
var userType = {
    MasterUser: 2,
    InRoomUser: 1,
    OutRoomUser: 0
};
///
//notification
//vargetLessonsApiAddress = mainApiAddress + "lesson/test";
var countNotificationAddFriendApiAddress = mainApiAddress + "notification/CountNotificationAddFriend/";
var countNotificationNewMessageApiAddress = mainApiAddress + "notification/CountNotificationNewMessage/";
var countNotificationFromRoomApiAddress = mainApiAddress + "notification/CountNotificationFromRoom/";


var notificationNewMessageApiAddress = mainApiAddress + "notification/NewMessage/";
var getJoinRoomApiAddress = mainApiAddress + "notification/GetJoinRoom/";
var getAcceptRoomApiAddress = mainApiAddress + "notification/AcceptRoom/";
var getAddFriendApiAddress = mainApiAddress + "notification/GetAddFriend/";


var getFriendsApiAddress = mainApiAddress + "friend/GetFriends/";
var countFriendsApiAddress = mainApiAddress + "friend/CountFriends/";
var delFriendApiAddress = mainApiAddress + "friend/DeleteFriend/";
var addFriendApiAddress = mainApiAddress + "friend/AddFriend/";
var checkWaitingAcceptApiAddress = mainApiAddress + "friend/CheckWaitingAccept/";


//var createMessageApiAddress = mainApiAddress + "message/CreateMessage/";

//delete notification
var deleteNotificationApiAddress = mainApiAddress + "notification/DeleteMessageNotification/";

///
//delete and accept Friend and UserRoom
var acceptFriendApiAddress = mainApiAddress + "notification/AcceptFriendNotification/";
var deleteAcceptFriendApiAddress = mainApiAddress + "notification/DeleteInviteFriendNotification/";
var deleteAcceptRoomApiAddress = mainApiAddress + "notification/DeleteAcceptRoomNotification/";
var deleteJoinRoomApiAddress = mainApiAddress + "notification/DeleteJoinRoom/";
var joinRoomApiAddress = mainApiAddress + "notification/JoinRoom/";
var addNotificationApiAddress = mainApiAddress + "notification/AddNotification/";
var delAllNotificationInRoomApiAddress = mainApiAddress + "notification/DeleteAllNotificationInRoom/";


////
//var messageApiAddress = mainApiAddress + "message/";
//message controller
var getMessageByRoomApiAddress = mainApiAddress + "message/GetByRoom/";
var getMessageByUserApiAddress = mainApiAddress + "message/GetByUser/";
var postMessageApiAddress = mainApiAddress + "message/PostMessage/";
var delAllMessageInRoomApiAddress = mainApiAddress + "message/DelAllMessageInRoom/";
var delMessageApiAddress = mainApiAddress + "message/DelMessage/";


////
///
//Lesson
var getLessonsApiAddress = mainApiAddress + "lesson/GetLessons/";
var getLessonDetailApiAddress = mainApiAddress + "lesson/GetLessonDetail/";
var postLessonApiAddress = mainApiAddress + "lesson/CreateLesson/";
var updateLessonApiAddress = mainApiAddress + "lesson/UpdateLesson/";
var getDataSpeakConfigApiAddress = mainFileAddress + "mespeak_config.json";
var getDataSpeakApiAddress = mainFileAddress + "en-us.json";

////
//Picture
var getPictureApiAddress = mainApiAddress + "picture/GetByLesson/";
var postPictureApiAddress = mainApiAddress + "picture/AddPicture/";
var delPictureApiAddress = mainApiAddress + "picture/DeletePicture/";

////
//word
var getWordByLessonApiAddress = mainApiAddress + "word/GetByLesson/";
var postWordApiAdress = mainApiAddress + "word/AddRange/";
var deleteWordByLessonApiAdress = mainApiAddress + "word/DeleteByLesson/";
var deleteWordApiAdress = mainApiAddress + "word/Delete/";


////
//systemobjectag
var getTagByLessonApiAddress = mainApiAddress + "systemObjectTag/GetByLesson/";
var deleteTagApiAddress = mainApiAddress + "systemObjectTag/Delete/";
var addRangeTagApiAddress = mainApiAddress + "tag/AddRange/";
var addRangeTagSystemApiAddress = mainApiAddress + "systemObjectTag/AddRange/";

////
//user room
var getRoomByUserApiAddress = mainApiAddress + "userroom/GetRoomByUser/";
var getUserByRoomApiAddress = mainApiAddress + "userroom/GetUserByRoom/";
var postRoomUserApiAddress = mainApiAddress + "userroom/AddUserRoom/";
var delRoomUserApiAddress = mainApiAddress + "userroom/DeleteUserRoom/";
var delAllUserInRoomApiAddress = mainApiAddress + "userroom/DeleteAllUserInRoom/";
var postUserRoomInfoApiAddress = mainApiAddress + "userroom/GetUserRoomInfo/";



////
//room
var searchRoomApiAddress = mainApiAddress + "room/SearchRoom/";
var nextLessonApiAddress = mainApiAddress + "room/NextLesson/";
var getRoomApiAddress = mainApiAddress + "room/Get/";
var createRoomApiAddress = mainApiAddress + "room/AddRoom/";
var updateRoomApiAddress = mainApiAddress + "room/UpdateRoom/";
var delRoomApiAddress = mainApiAddress + "room/DeleteRoom/";

////
//user
var createUserApiAddress = mainApiAddress + "user/CreateUser/";
var updateUserApiAddress = mainApiAddress + "user/UpdateUser/";
var getUsersApiAddress = mainApiAddress + "user/Gets/";
var getUsersByGroupApiAddress = mainApiAddress + "user/GetByGroup/";
var searchUserApiAddress = mainApiAddress + "user/SearchUser/";
var getUserApiAddress = mainApiAddress + "user/Get/";
var getUserWithAuthenApiAddress = mainApiAddress + "user/GetWithAuthen/";
var updateBlockApiAddress = mainApiAddress + "user/BlockActiveUser/";
var delUserApiAddress = mainApiAddress + "user/DeleteUser/";
var checkEmailApiAddress = mainApiAddress + "user/CheckEmail/";
var checkUserApiAddress = mainApiAddress + "user/CheckUser/";
var sendPassApiAddress = mainApiAddress + "user/SendPassWorkToEmail/";
var activeAccountApiAddress = mainApiAddress + "user/ActiveAccount/";
var changePasswordApiAddress = mainApiAddress + "user/ChangePassword/";
////
//role
var getRolesApiAddress = mainApiAddress + "role/GetRoles/";
var postRoleApiAddress = mainApiAddress + "role/AddRole/";
var putRoleApiAddress = mainApiAddress + "role/UpdateRole/";
var deleteRoleApiAddress = mainApiAddress + "role/DeleteRole/";

////
//group
var getGroupsApiAddress = mainApiAddress + "group/GetGroups/";
var postGroupApiAddress = mainApiAddress + "group/AddGroup/";
var putGroupApiAddress = mainApiAddress + "group/UpdateGroup/";
var deleteGroupApiAddress = mainApiAddress + "group/DeleteGroup/";

////
//grouprole
var getGroupRolesByGroupApiAddress = mainApiAddress + "grouprole/GetRoleByGroup/";
var getGroupRolesApiAddress = mainApiAddress + "grouprole/Gets/";
var postGroupRolesApiAddress = mainApiAddress + "grouprole/AddGroupRole/";
var delGroupRolesApiAddress = mainApiAddress + "grouprole/DeleteGroupRole/";
////
//file
var uploadFileApiAddress = mainApiAddress + "file/UploadFile/";
var deleteFileApiAddress = mainApiAddress + "file/DeleteFile/";
